﻿using System;
using System.Runtime.Serialization;
using System.Text;

namespace FBProject.BusinessLogic.MSProjectProxies
{
    [Serializable]
    public class CannotAccessMSProjectException : Exception
    {
        public CannotAccessMSProjectException(Exception innerException)
            : base("Cannot access MS Project application.", innerException)
        { }

        public override string Message
        {
            get
            {
                var messageBuilder = new StringBuilder(base.Message);
                if (InnerException != null)
                {
                    messageBuilder.AppendFormat(" Error: {0}", InnerException.Message);
                }
                return messageBuilder.ToString();
            }
        }
    }
}
